package com.asset.dispoal.department.service;

import com.asset.dispoal.department.api.SysDepartmentQueryService;
import com.asset.dispoal.department.dto.DepartmentRequest;
import com.asset.dispoal.department.dto.DepartmentResponse;
import com.asset.dispoal.department.service.commom.QueryDepartmentCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.mhuang.pacebox.springboot.protocol.Result;

import java.util.List;

/**
 * @author qr
 * @date 2022/2/15$
 */
@Service
public class DepartmentQueryServiceImpl implements SysDepartmentQueryService {

    @Autowired
    QueryDepartmentCommand queryDepartmentCommand;

    @Override
    public Result<List<DepartmentResponse>> queryDepartment(DepartmentRequest request) {
        return queryDepartmentCommand.execute(request);
    }
}
